<!--
  Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.

  https://www.mall4j.com/

  未经允许，不可做商业用途！

  版权所有，侵权必究！
-->

<template>
  <div class="Mall4j goods-module-component">
    <goods-module-five :config="config" />
  </div>
</template>
<script setup>
import goodsModuleFive from '../goods-component/goods-module-five/index.vue'
const props = defineProps({
  itemComponent: { // 组件的信息
    type: Object,
    default: () => {}
  }
})

const config = ref({})
// 监听组件的信息
watch(() => props.itemComponent, (newVal) => {
  if (JSON.stringify(newVal.rightConfigMessage) !== '{}') {
    config.value = {
      bgImg: newVal.rightConfigMessage.bgImg,
      goodsList: newVal.rightConfigMessage.goodsList,
      path: newVal.rightConfigMessage.path
    }
  }
}, {
  immediate: true,
  deep: true
})

</script>
<style lang="scss" scoped>
.goods-module-component {
  width: 1200px;
  margin: 0 auto;
}
</style>
